﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data;
using System.Data.SqlClient;

namespace ClientRegister
{
    public class RoleDataProvider
    {
        ConnectDB connect = new ConnectDB();
        private SqlConnection cnn;
        private SqlCommand cmd;
        private SqlDataAdapter ada;

        public DataSet loadRole()
        {
            DataSet ds = new DataSet();
            cnn = connect.Connect();
            cnn.Open();
            cmd = new SqlCommand("select IDRole, Role from Role", cnn);
            ada = new SqlDataAdapter(cmd);
            ada.Fill(ds);
            return ds;
        }
    }
}
